Skip to content

Experimental WinPowerShell DSC import extension #1025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 46 commits into
base: main
Choose a base branch
from

Conversation

Gijsreyn
Copy link
Contributor

@Gijsreyn Gijsreyn commented Aug 2, 2025

PR Summary

This PR introduces a Windows PowerShell DSC import extension that enables the passing in of PSDSC v2 configuration documents.

PR Context

The PR adds three new files to the build:

  • convert-resource.ps1
  • convertDscResource.psd1
  • convertDscResource.psm1

When a user passes in a .ps1 file with a valid DSC configuration document, an attempt is made to convert it by borrowing content from DSCParser.

@Gijsreyn Gijsreyn changed the title Experimental PowerShell DSC import extension Experimental WinPowerShell DSC import extension Aug 3, 2025
@Gijsreyn
Copy link
Contributor Author

Gijsreyn commented Aug 4, 2025

@SteveL-MSFT Any idea why the Windows build failed on fetching packages?

@SteveL-MSFT
Copy link
Member

@Gijsreyn I'd hold off on this for now, I'm working on a big PR to fix the Windows CI. Basically there was one issue in a test which caused Pester to crash so even though Windows tests have been failing, it was never reported. Since making that fix, many existing tests are failing which I'm now fixing one by one.

@Gijsreyn Gijsreyn force-pushed the implement-powershell-import-extension branch from a9e618e to 5fdc34d Compare August 8, 2025 06:54
@Gijsreyn
Copy link
Contributor Author

Hi @SteveL-MSFT, this one was a pretty tough one, especially with the latest fixes on the build.ps1 script. Yet, I had a successful run at: https://github.com/PowerShell/DSC/actions/runs/16867533276. Then I thought it should be relatively easy to include pwsh.exe as well, which I have now done. However, this raised another issue because both extensions accept .ps1.

Now there's a conflict between the ones. Is there another indication to tell DSC's engine what extension to use?

@Gijsreyn Gijsreyn force-pushed the implement-powershell-import-extension branch from 6bdf559 to f7069cb Compare August 11, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants